package com.cimpm.permission.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.hby.common.annotation.entity.AllowNull;
import com.hby.common.annotation.entity.VerifyRepetitionField;
import com.hby.common.typeHandler.DateTypeHandler;

import java.util.Date;

@TableName("permission_user")
public class User {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

	@VerifyRepetitionField
	private String name;

	@AllowNull
	private String pwd;

    @TableField(typeHandler = DateTypeHandler.class)
    private String createTime;

	private String state;

	private String realName;

    @TableLogic
    private Date isDeleted;

    @Version
    private Integer version;

    public Integer getId() { return id; }

    public void setId(Integer id) { this.id = id; }

    public String getName() { return name; }

    public void setName(String name) { this.name = name; }

    public String getPwd() { return pwd; }

    public void setPwd(String pwd) { this.pwd = pwd; }

    public String getCreateTime() { return createTime; }

    public void setCreateTime(String createTime) { this.createTime = createTime; }

    public String getState() { return state; }

    public void setState(String state) { this.state = state; }

    public String getRealName() { return realName; }

    public void setRealName(String realName) { this.realName = realName; }

    public Date getIsDeleted() { return isDeleted; }

    public void setIsDeleted(Date isDeleted) { this.isDeleted = isDeleted; }

    public Integer getVersion() { return version; }

    public void setVersion(Integer version) { this.version = version; }

    @Override
    public String toString() {
    return "user{" +
            "id=" + id +
            ", name=" + name +
            ", pwd=" + pwd +
            ", createTime=" + createTime +
            ", state=" + state +
            ", realName=" + realName +
            ", isDeleted=" + isDeleted +
            ", version=" + version +
            '}';
    }

}
